Skip to content

feat: comments#1685

Open
Bennit99 wants to merge 7 commits intoopencast:developfrom
Bennit99:develop
Open

feat: comments#1685
Bennit99 wants to merge 7 commits intoopencast:developfrom
Bennit99:develop

Conversation

@Bennit99
Copy link
Copy Markdown

@Bennit99 Bennit99 commented Mar 3, 2026

Adds a comment system for video editing like in the old admin UI.

  • Comments.tsx: Renders a scrollable list of comments with nested replies, timestamps, and status badges. Includes forms to add comments (with a required reason dropdown), reply, delete, and toggle resolved status.

  • commentSlice.ts: Manages local state for adding, deleting, and updating comments. Tracks uncommitted changes hasChanges and handles temporary local IDs.

  • Also configure a temporary vite dev proxy to bypass CORS for testing with loacal opencast instance

  • For testing create and delete some comments and replies

Issue: Feature Request: Make comments available

backend PR

Bennit99 added 2 commits March 2, 2026 20:54
Adds a comment system for video editing.

- Comments.tsx: Renders a scrollable list of comments with nested replies, timestamps, and status badges. Includes forms to add comments (with a required reason dropdown), reply, delete, and toggle resolved status.
- commentSlice.ts: Manages local state for adding, deleting, and updating comments. Tracks uncommitted changes (\hasChanges\) and handles temporary local IDs.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Hi @Bennit99
Thank you for contributing to the Opencast Editor.
We noticed that you have not yet filed an Individual Contributor License Agreement. Doing that (once) helps us to ensure that Opencast stays free for all. If you make your contribution on behalf of an institution, you might also want to file a Corporate Contributor License Agreement (giving you as individual contributor a bit more security as well). It can take a while for this bot to find out about new filings, so if you just filed one or both of the above do not worry about this message!
Please let us know if you have any questions regarding the CLA.

Form submitted - G

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

This pull request is deployed at test.editor.opencast.org/1685/2026-03-27_08-12-36/ .
It might take a few minutes for it to become available.

@Arnei Arnei added the type:feature A new feature or feature request label Mar 4, 2026
@gregorydlogan
Copy link
Copy Markdown
Member

For those curious, I have confirmed that this is a student at Munster.

@github-actions
Copy link
Copy Markdown

Hi @Bennit99
Thank you for contributing to the Opencast Editor.
We noticed that you have not yet filed an Individual Contributor License Agreement. Doing that (once) helps us to ensure that Opencast stays free for all. If you make your contribution on behalf of an institution, you might also want to file a Corporate Contributor License Agreement (giving you as individual contributor a bit more security as well). It can take a while for this bot to find out about new filings, so if you just filed one or both of the above do not worry about this message!
Please let us know if you have any questions regarding the CLA.

Copy link
Copy Markdown
Member

@mtneug mtneug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected. Only some small comments from my side. Since I don't really work on the front-end, it would be great to also get a review from someone more familiar with the codebase.

Copy link
Copy Markdown
Member

@gregorydlogan gregorydlogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not confident enough to review this properly. @Arnei can you, or delegate to someone who would be confident reviewing this?

show = true

[comments]
show = false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be true, since this config is what's backing editor.opencast.org and we want to show off all of the bells and whistles.

Copy link
Copy Markdown
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks very good to me! The stuff below is all pretty nitpicky.

I think I might have liked it better if the component was not quite as monolithic and split into more components, but I can see why you did that and it should not cause any trouble.

One thing I would like to see changed is the use of colors, namely I think there should be less of them. The color scheme of the editor is decidedly grayscale. Colors should not be used to make the ui look nice, but to explicitly draw the users attention to certain elements. For example, red signifies danger, so having the delete buttons in red makes sense to me. But the Submit/Reply/Cancel buttons at the bottom right do not require any color in my opinion. I'd say the same goes for the badges. Here there is also the additional issue that their color contrast to the background is quite low in light mode, making them hard to read.

},

"comments": {
"no-comments": "No comments yet. Be the first to comment!",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would make sense for a social media post or similar, but there is no reason to incentivize posting comments in Opencast. I think "No comments yet." is enough.


// Handlers
const handleSaveComment = () => {
if (!settings.id || !newCommentText || !commentReason) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not like it is causing problems, but why are we checking for settings.id in the save handlers?

Comment on lines +135 to +143
// Modern scrollbar styling
"&::-webkit-scrollbar": {
width: "8px",
background: theme.background,
},
"&::-webkit-scrollbar-thumb": {
background: theme.text,
borderRadius: "5px",
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not bad or anything, but definitely different from every other scrollbar in the editor. I don't think the stylistic inconsistency is worth it?


return (
<div css={containerStyle}>
<h2 css={titleStyleBold(theme)}>{t("mainMenu.comments-button")}</h2>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with other views, could you center the title?

gap: "6px",
fontSize: "0.9em",
color: theme.text,
opacity: 0.7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a fixed opacity can lead to low contrast in the high-contrast color modes. You'll likely either want to make your opacity level a theme variable, or adjust your text color.

<Select<{ value: string; label: string }>
styles={selectFieldStyle(theme)}
value={commentReason
? { value: commentReason, label: t(`comments.reasons.${commentReason}` as never) }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more semantically correct type here would be ParseKeys from i18next. Might also make sense to type commentReason in a way that no typecast is needed? (same for the other two occurences of this)

"wrong_series_publication": "Wrong series or publication channel",
"wrong_workflow": "Wrong workflow",
"processing_failure": "Processing failure",
"admin_ui_notes": "Notes in Admin UI"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be adminui_notes?

id: nanoid(),
creationDate: new Date().toISOString(),
author: "", // Backend stamps the actual author via SecurityService
displayName: "",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we could have the display name of the current user here? It is a bit disorienting that new comments do not have the name of a user associated with them in the ui.

@mtneug
Copy link
Copy Markdown
Member

mtneug commented Apr 15, 2026

FYI: I will take over the development of this PR as @Bennit99 sadly no longer works as a student for us. It might take some time, but I will work on the mentioned issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature A new feature or feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants